cmake_minimum_required(VERSION 2.6)
PROJECT(slog)
AUX_SOURCE_DIRECTORY(./ SRC_LIST)
SET(CMAKE_MACOSX_RPATH 1)
SET(LIBRARY_OUTPUT_PATH .)

ADD_DEFINITIONS( -g -W -Wall -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DAC_HAS_INFO
-DAC_HAS_WARNING -DAC_HAS_ERROR -DAC_HAS_CRITICAL -DTIXML_USE_STL
-DAC_HAS_DEBUG -DLINUX_DAEMON)

INCLUDE_DIRECTORIES(./ ./include ./include/log4cxx)
LINK_DIRECTORIES(./ ./lib)

#ADD_XXXX必须在TARGET_LINK_LIBRARIES前面，否则会报错
#ADD_LIBRARY(${PROJECTNAME} SHARED/STATIC ${SRC_LIST})
#ADD_EXECUTABLE(slog ${SRC_LIST})
ADD_LIBRARY(slog SHARED ${SRC_LIST})

TARGET_LINK_LIBRARIES(slog log4cxx)